 <{assign var=defaultImage value=app::get('image')->getConf('image.set')}>
<{assign var=defaultImage value=$defaultImage['S']['default_image']}>
<div class="TopBrandList" id="TopBrandList_<{$widgets_id}>">
  <ul>
  <{foreach from=$data item=adata key=key}>
  
  <{if $key <= $setting.showing}>
  <li class="l<{$key+1}> dotsep hl">
  <div class="num"><{$key+1}></div>
  <div class="goods-pic switchable-panel" style="display:none; overflow:hidden;text-align:center;vertical-align:center;
        
    <{if $env.conf.b2c.site.thumbnail_pic_width>0 && $env.conf.b2c.site.thumbnail_pic_height>0}>width:<{$env.conf.b2c.site.thumbnail_pic_width}>px;height:<{$env.conf.b2c.site.thumbnail_pic_height}>px;<{/if}>">
    <textarea class="textarea-lazyload"> 
    <a href="<{link app=b2c ctl=site_product act=index arg=$adata.goods_id}>" target="_blank" title="<{$adata.name}>"> <img src="<{if $adata.udfimg == 'true'}><{$adata.thumbnail_pic|storager}><{elseif $adata.image_default_id}><{$adata.image_default_id|storager:'s'}><{else}><{$defaultImage|storager}><{/if}>"> </a>

        <ul class="goods-info">
          <li><{$setting.mktPriceText|default:$___b2c='市场价'|t:'b2c'}><{$setting.mktPriceSep|default:':'}><del><{$adata.mktprice|cur}></del></li>
          <li><{$setting.priceText|default:$___b2c='销售价'|t:'b2c'}><{$setting.priceSep|default:':'}><em class='TopBrandList-price'><{$adata.price|cur}></em></li>
        </ul>
    	       </textarea>
  </div>
  <div class="switchable-trigger"><a href="<{link app=b2c ctl=site_product act=index arg=$adata.goods_id}>" target="_blank" title="<{$adata.name}>" style="color:<{$setting.fontColor}>;<{$setting.fontStyle|styleset}>"><{$adata.name|cut:$setting.maxlength}></a></div>
  </li>
  <{else}>
  <li class="l<{$key+1}> dotsep">
  <div class="num"><{$key+1}></div>
  <div class="goods-pic switchable-panel" style="display:none; overflow:hidden;text-align:center;vertical-align:center;
      
    <{if $env.conf.b2c.site.thumbnail_pic_width>0 && $env.conf.b2c.site.thumbnail_pic_height>0}>width:<{$env.conf.b2c.site.thumbnail_pic_width}>px;height:<{$env.conf.b2c.site.thumbnail_pic_height}>px;<{/if}>">
    <textarea class="textarea-lazyload"> 
     <a href="<{link app=b2c ctl=site_product act=index arg=$adata.goods_id}>" target="_blank" title="<{$adata.name}>"> <img src="<{if $adata.udfimg == 'true'}><{$adata.thumbnail_pic|storager}><{elseif $adata.image_default_id}><{$adata.image_default_id|storager:'s'}><{else}><{$defaultImage|storager}><{/if}>"> </a>
         
        <ul class="goods-info">
          <li><{$setting.mktPriceText|default:$___b2c='市场价'|t:'b2c'}><{$setting.mktPriceSep|default:':'}><del><{$adata.mktprice|cur}></del></li>
          <li><{$setting.priceText|default:$___b2c='销售价'|t:'b2c'}><{$setting.priceSep|default:':'}><em class='TopBrandList-price'><{$adata.price|cur}></em></li>
        </ul>
               </textarea>
  </div>
  <div class="switchable-trigger"><a href="<{link app=b2c ctl=site_product act=index arg=$adata.goods_id}>" target="_blank" title="<{$adata.name}>" style="color:<{$setting.fontColor2}>;<{$setting.fontStyle2}>"><{$adata.name|cut:$setting.maxlength}></a></div>
  </li>
  <{/if}>
  
  <{/foreach}>
  </ul>
</div>
<script>
  window.addEvent('domready', function(){
  	new  Accordion('TopBrandList_<{$widgets_id}>',{eventType:'mouse', onInit: function(){
		this.triggers[0].addClass('active');
		this.panels[0].setStyle('display', 'block');
		this.container.getElements('li.dotsep')[0].addClass('hover');
	},
	onSwitch: function(args){
		var lis = this.container.getElements('li.dotsep');
		if(lis){
			lis.removeClass('hover');
			lis[args.currentIndex].addClass('hover');
		}
	}});
  });
</script>